
var wx = require('../libs/index');
module.exports = function(app, router) {
  router.get('/weixin/auth', function *(next) {

      this.request.is('*/xml');
      var queryObj = this.query;

      this.body = wx.signature(queryObj);
  });

  router.post('/weixin/auth', function *(next) {

      this.set("Content-type", "text/xml");
      this.body = wx.send(this.xmlBody);
  });

}
